//
//  QuickOrderCoffeeIntentHandler.m
//  QuickOrderCoffee
//
//  Created by zxy on 2019/11/25.
//  Copyright © 2019 zxy. All rights reserved.
//

#import "QuickOrderCoffeeIntentHandler.h"
#import "CoffeeModel.h"
#import "FMDBTool.h"

@implementation QuickOrderCoffeeIntentHandler

- (void)resolveNameForQuickOrderCoffee:(QuickOrderCoffeeIntent *)intent withCompletion:(void (^)(INStringResolutionResult * _Nonnull))completion {
    //在hanle中用intent.name取到的值，取决于你在这里传了什么
    completion([INStringResolutionResult successWithResolvedString:intent.name]);
}

- (void)handleQuickOrderCoffee:(QuickOrderCoffeeIntent *)intent completion:(void (^)(QuickOrderCoffeeIntentResponse * _Nonnull))completion {
    NSArray *coffeeArr = [FMDBTool allCoffees];
    CoffeeModel *coffee = coffeeArr.firstObject;
    NSLog(@"%@",coffee.name);
}


@end
